﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BSCMFF.Core.DataAccessLayer
{
    /// <summary>
    /// Status of evaluation period - according to current date
    /// </summary>
    /// <remarks></remarks>
    public partial class Evaluation_Period
    {
        /// <summary>
        /// Gets the status of evaluation period.
        /// </summary>
        /// <remarks></remarks>
        public String Status
        {
            get
            {
                if (DateTime.Today < this.StartDate)
                {
                    return "Planned";
                }
                if (DateTime.Today >= this.StartDate && DateTime.Today <= this.EndDate)
                {
                    return "In Progress";
                }
                if (DateTime.Today > this.EndDate)
                {
                    return "Finished";
                }
                return "";
            }
        }
    }
}
